import axios, { Axios } from 'axios'
const context = '/recipeservice'

/**
 * 获取 materialCategory 分页列表
 */
export function getMaterialCategoryPagination(data: any) {
  return axios.get(`${context}/materialCategory/pagination`, { params: data })
}

/**
 * 获取 materialCategory 所有数据
 */
export function getMaterialCategoryAllList(data: any) {
  return axios.get(`${context}/materialCategory/all`, { params: data })
}

/**
 * 获取 materialCategory 详情
 */
export function getMaterialCategoryDetailById(id: any) {
  return axios.get(`${context}/materialCategory/${id}`, { params: { id } })
}

/**
 * 新增 materialCategory
 */
export function addMaterialCategory(data: any) {
  return axios.post(`${context}/materialCategory`, data)
}

/**
 * 修改 materialCategory
 */
export function updateMaterialCategory(data: any) {
  return axios.put(`${context}/materialCategory`, data)
}

/**
 * 删除 materialCategory
 */
export function batchRemoveMaterialCategory(data: any) {
  return axios.post(`${context}/materialCategory/batchRemove`, data)
}
